Template-based capture verification for multi-site pacing

ABSTRACT

An apparatus and method for verifying capture by first and second pacing pulses in which an evoked response waveform recorded during a pacing event is compared with template waveforms representing capture by the first, second, and both pacing pulses. The evoked response is then classified as representing a type of capture represented by a template waveform if the evoked response waveform highly correlates with one template waveform and has correlation values with the other template waveforms within specified bounds.

CROSS-REFERENCE TO RELATED APPLICATION(S)

This application is a continuation of U.S. application Ser. No.10/251,629, filed on Sep. 19, 2002, which is a continuation-in-part ofU.S. application Ser. No. 10/003,718, filed on Oct. 26, 2001, now issuedas U.S. Pat. No. 7,177,689, the specifications of which are incorporatedby reference herein.

FIELD OF THE INVENTION

This invention pertains to cardiac pacemakers and, in particular, tosystems and methods for ascertaining the performance of the device andadjusting pacing parameters accordingly.

BACKGROUND

Implantable cardiac pacemakers are a class of cardiac rhythm managementdevices that provide electrical stimulation in the form of pacing pulsesto selected chambers of the heart. (As the term is used herein, apacemaker is any cardiac rhythm management device with a pacingfunctionality regardless of any additional functions it may perform suchas cardioversion/defibrillation.) Pacemakers typically have aprogrammable electronic controller that causes the pacing pulses to beoutput in response to lapsed time intervals and sensed electricalactivity (i.e., intrinsic heart beats). Most pacemakers are programmedto operate in a so-called demand mode (a.k.a., synchronous mode), wherea pacing pulse is delivered to a heart chamber during a cardiac cycleonly when no intrinsic beat by the chamber is detected. An escapeinterval is defined for each paced chamber, which is the minimum timeinterval in which a beat must be detected before a pace will bedelivered. The ventricular escape interval thus defines the minimum rateat which the pacemaker will allow the heart to beat, sometimes referredto as the lower rate limit. If functioning properly, the pacemaker inthis manner makes up for a heart's inability to pace itself at anappropriate rhythm.

In order for a pacemaker to control the heart rate in the mannerdescribed above, the paces delivered by the device must achieve“capture,” which refers to causing sufficient depolarization of themyocardium that a propagating wave of excitation and contraction result(i.e., a heart beat). A pacing pulse that does not capture the heart isthus an ineffective pulse. This not only wastes energy from the limitedenergy resources (battery) of pacemaker, but can have deleteriousphysiological effects as well, since a demand pacemaker that is notachieving capture is not performing its function in enforcing a minimumheart rate. A number of factors can determine whether a given pacingpulse will achieve capture, but the principal factor of concern here isthe energy of the pulse, which is a function of the pulse's amplitudeand duration. The minimum pacing pulse energy necessary to achievecapture by a particular pacing channel is referred to as the capturethreshold. Programmable pacemakers enable the amplitude and pulse widthof pacing pulses to be adjusted, along with other parameters. It iscommon practice to determine the capture threshold by initially pacingwith a high energy to ensure capture and then progressively lowering thepacing pulse energy during a sequence of cardiac cycles until capture isno longer achieved. The pacing pulse energy can then be adjusted to anappropriate value in accordance with the determined capture threshold bysetting it equal to the capture threshold plus a specified safetymargin.

A common technique used to determine if capture is present during agiven cardiac cycle is to look for an “evoked response” immediatelyfollowing a pacing pulse. The evoked response is the wave ofdepolarization that results from the pacing pulse and evidences that thepaced chamber has responded appropriately and contracted. By detectingan evoked atrial or ventricular depolarization that exceeds a specifiedvalue (i.e., corresponding to an evoked P-wave or evoked R-wave,respectively, on a surface electrocardiogram or their equivalents in aninternal electrogram), the pacemaker is able to detect whether thepacing pulse (A-pulse or V-pulse) was effective in capturing the heart,that is, causing a contraction in the respective heart chamber. Captureverification can be performed in the clinical setting, with theclinician then adjusting pacing parameters so that the heart is reliablypaced. It is desirable, however, for the pacemaker itself to be capableof verifying capture so that loss of capture can be detected when itoccurs with pacing parameters then adjusted automatically, a functionknown as autocapture. (See, e.g., U.S. Pat. No. 6,169,921 issued toKenKnight, et. al. and presently assigned to Cardiac Pacemakers, Inc.)An autocapture function provides the pacemaker with extended longevity,greater ease of use, and greater patient safety.

Also included within the concept of cardiac rhythm is the manner anddegree to which the heart chambers contract during a cardiac cycle toresult in the efficient pumping of blood. For example, the heart pumpsmore effectively when the chambers contract in a coordinated manner. Theheart has specialized conduction pathways in both the atria and theventricles that enable the rapid conduction of excitation (i.e.,depolarization) throughout the myocardium. These pathways conductexcitatory impulses in a manner that results in a coordinatedcontraction of both atria and both ventricles.

Without the synchronization afforded by the normally functioningspecialized conduction pathways, the heart's pumping efficiency isgreatly diminished. Patients who exhibit pathology of these conductionpathways, such as bundle branch blocks, can thus suffer compromisedcardiac output. The resulting diminishment in cardiac output may besignificant in a patient with congestive heart failure (CHF) whosecardiac output is already compromised. Intraventricular and/orinterventricular conduction defects can also be a cause of CHF in somepatients. In order to treat these problems, pacemakers have beendeveloped which provide electrical pacing stimulation to one or both ofthe atria and/or ventricles during a cardiac cycle in an attempt toimprove the coordination of atrial and/or ventricular contractions,termed cardiac resynchronization therapy. To optimize the cardiac outputfor some heart failure patients, for example, the right and leftventricles are paced synchronously with a determined time offset, termedbiventricular pacing.

Multi-site resynchronization pacing, however, is problematic forconventional capture verification methods based upon evoked responsedetection as described above. In biventricular pacing, for example, theproximity in time of resynchronization paces to the left and rightventricles may prevent an evoked response caused by the first pace frombeing distinguished from the second pace. In addition, the second pacecould interfere with evoked response sensing when the evoked responsefrom the first pace occurs within an amplifier blanking intervalinitiated by the second pace.

SUMMARY OF THE INVENTION

A depolarization waveform, such as a surface electrocardiogram (ECG) orinternal electrogram, recorded during a paced event that achievescapture exhibits morphological differences from that recorded during apaced event that fails to achieve capture. Also, when multiple pacingpulses are delivered to either the atria or the ventricles during acardiac cycle, the morphology of the depolarization waveform thatresults is affected if even one of the pacing pulses fails to achievecapture. In accordance with the invention, capture of the heart by apacing pulse is verified by comparing an evoked response or testdepolarization waveform recorded during the paced event with a referencetemplate waveform representing capture of the heart by a similarlydelivered pacing pulse. The comparison may be done by cross-correlatingthe reference template and test waveforms so that loss of the capture isdetected when the two waveforms become uncorrelated. In a multi-sitepacing situation, template waveforms representing capture by each paceindividually and by all of the paces collectively can be used todetermine which pace failed to achieve capture and to simplify thedetermination of capture thresholds for each pacing site.

In a situation where first and second pacing pulses are output to eitherthe atria or ventricles during a cardiac cycle, capture by both pacingpulses may be detected if a recorded evoked response waveform is highlycorrelated with a template waveform representing capture by both pacingpulses and, additionally, is correlated with template waveformsrepresenting capture by only the first pacing pulse and capture by onlythe second pacing pulse only to a specified extent. In an exemplaryembodiment, biventricular capture is detected if the evoked responsehighly correlates with a template waveform representing biventricularcapture and correlates with templates representing right ventricular andleft ventricular capture to roughly the same extent as does thebiventricular capture template.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a multi-site pacemaker.

FIGS. 2A and 2B illustrate an ECG recorded after a pace and a templateECG.

FIGS. 3A and 3B illustrate exemplary embodiments of algorithms forcapture threshold determination.

FIGS. 4A and 4B illustrate exemplary embodiments of an auto-capturealgorithm.

FIG. 5 illustrates an exemplary template acquisition algorithm.

FIG. 6 shows examples of BiV, RV, and LV paced evoked responses.

FIG. 7 illustrates an algorithm for enhanced discrimination betweenevoked responses.

FIG. 8 shows a plot of the template correlation coefficients waveformssuch as shown in FIG. 6.

DETAILED DESCRIPTION

The present invention may be incorporated into pacemakers having anumber of different pacing configurations, including multi-site pacingconfigurations for delivering various types of resynchronization therapywhere a pace is delivered to each of the paired atria and/or ventriclesduring a cardiac cycle or where multiple paces are delivered to a singlechamber. For illustrative purposes, however, a the invention will bedescribed with reference to a dual-chamber pacemaker (i.e., one thatsenses and/or paces both the atria and ventricles) having twoventricular pacing channels for pacing both ventricles or delivering twopaces to a single ventricle as shown in FIG. 1.

a. Hardware Platform

Pacemakers are typically implanted subcutaneously on a patient's chestand have leads threaded intravenously into the heart to connect thedevice to electrodes used for sensing and pacing. A programmableelectronic controller causes the pacing pulses to be output in responseto lapsed time intervals and sensed electrical activity (i.e., intrinsicheart beats not as a result of a pacing pulse). Pacemakers senseintrinsic cardiac electrical activity by means of internal electrodesdisposed near the chamber to be sensed. A depolarization wave associatedwith an intrinsic contraction of the atria or ventricles that isdetected by the pacemaker is referred to as an atrial sense orventricular sense, respectively. In order to cause such a contraction inthe absence of an intrinsic beat, a pacing pulse (either an atrial paceor a ventricular pace) with energy above the capture threshold must bedelivered to the chamber.

The controller of the pacemaker is made up of a microprocessor 10communicating with a memory 12, where the memory 12 may comprise a ROM(read-only memory) for program storage and a RAM (random-access memory)for data storage. The controller could be implemented by other types oflogic circuitry (e.g., discrete components or programmable logic arrays)using a state machine type of design, but a microprocessor-based systemis preferable. The controller is capable of operating the pacemaker in anumber of programmed modes where a programmed mode defines how pacingpulses are output in response to sensed events and expiration of timeintervals. A telemetry interface 80 is provided for communicating withan external programmer 300. The external programmer is a computerizeddevice with a controller 330 that can interrogate the pacemaker andreceive stored data as well as adjust the operating parameters of thepacemaker.

The pacemaker has an atrial sensing/pacing channel comprising ringelectrode 33A tip electrode 33B sense amplifier 31, pulse generator 32,and an atrial channel interface 30 which communicates bidirectionallywith a port of microprocessor 10. The device also has two ventricularsensing/pacing channels that similarly include ring electrodes 43A and53A tip electrodes 43B and 53B sense amplifiers 41 and 51, pulsegenerators 42 and 52, and ventricular channel interfaces 40 and 50. Foreach channel, the electrodes are connected to the pacemaker by a leadand used for both sensing and pacing. A MOS switching network 70controlled by the microprocessor is used to switch the electrodes fromthe input of a sense amplifier to the output of a pulse generator. Ashock channel is also provided comprising a shock pulse generator 90 andshock electrodes 91A and 91B that enables the device to deliver adefibrillation shock to the heart when fibrillation or othertachyarrhythmia is detected. The pacemaker also has an evoked responsesensing channel that comprises an evoked response channel interface 20and a sense amplifier 21 that has its differential inputs connected to aunipolar electrode 23 and to the device housing or can 60 through theswitching network 70. The evoked response sensing channel may be used toverify that a pacing pulse has achieved capture of the heart in aconventional manner or, as explained below, used to record an evokedresponse electrogram.

The channel interfaces include analog-to-digital converters fordigitizing sensing signal inputs from the sensing amplifiers, registersthat can be written to for adjusting the gain and threshold values ofthe sensing amplifiers, and, in the case of the ventricular and atrialchannel interfaces, registers for controlling the output of pacingpulses and/or adjusting the pacing pulse energy by changing the pulseamplitude or pulse width. The microprocessor 10 controls the overalloperation of the device in accordance with programmed instructionsstored in memory. The sensing circuitry of the pacemaker generatesatrial and ventricular sense signals when voltages sensed by theelectrodes exceed a specified threshold. The controller then interpretssense signals from the sensing channels and controls the delivery ofpaces in accordance with a programmed pacing mode. The sense signalsfrom any of the sensing channels of the pacemaker in FIG. 1 can bedigitized and recorded by the controller to constitute an electrogramthat can either be transmitted via the telemetry link 80 to the externalprogrammer 300 or stored for later transmission. The patient's cardiacactivity may thus be observed in real-time or over a selected historicalperiod.

The electrical response of the heart to a pacing pulse is referred to asan evoked response. If the evoked response indicates that a propagatingwave of depolarization has resulted from the pacing pulse, it evidencesthat the paced chamber has responded appropriately and contracted. Anevoked response can therefore be used to verify that the pace hasachieved capture of the heart. In accordance with the invention, anelectrogram can also be recorded of an evoked response to a pace andused to determine if capture is achieved by comparing the recordedelectrogram with a template electrogram representing capture of theheart by a similarly delivered pace. An evoked response sensing channelfor recording an electrogram can be a sensing channel normally used forother purposes or can be a sensing channel dedicated to sensing evokedresponses. It is preferable to record the electrogram with a unipolarelectrode that “sees” a larger volume of the myocardium as a wave ofelectrical activity spreads than a bipolar electrode. In the embodimentillustrated in FIG. 1, the atrial and ventricular sensing pacingchannels utilize bipolar electrodes, and a dedicated evoked responsesensing channel is provided with a unipolar electrode. Alternateembodiments may employ unipolar electrodes in the atrial and/orsensing/pacing channels, in which case unipolar sensing of an evokedresponse may be performed with those channels instead of a dedicatedchannel. The evoked response sensing channel may also be implemented bythe shock channel wherein the shock leads normally used for deliveringdefibrillation shocks to the heart are switched to a sensing amplifierby the switch matrix 70.

b. Template-Based Capture Verification and Threshold Determination

In accordance with the invention, capture of heart by multiple pacingpulses delivered to the atria and/or ventricles during a cardiac cycleis verified by recording an evoked response waveform during the pacingcycle, also referred to herein as a test depolarization waveform, andcomparing the recorded waveform with a template depolarization waveformrepresenting capture of the heart by at least one pacing pulse. Althoughthe method described herein for capture verification and thresholddetermination may be applied to any multi-site pacing configuration, thefollowing detailed explanation and description of specific embodimentswill be confined to a biventricular pacing configuration where bothventricles are paced during a cardiac cycle separated by a programmedoffset.

Delivery of multiple paces to the ventricles during a cardiac cyclechanges the pattern of the resulting depolarization as compared with thepattern that results from a single ventricular pace. This differenceappears as a QRS wave morphology change in a recorded depolarizationwaveform such as a surface ECG or electrogram that senses thetime-varying net dipole vector produced by the depolarization. Areference template waveform can be created by recording a ventricularECG or electrogram during a biventricular pacing cycle that is known toachieve capture with both pacing pulses. Presence or absence of capturefor a given pace can then be determined by comparing the templatewaveform with a test depolarization waveform recorded during the pace.FIG. 2A shows an example of a template ECG waveform TMP and a test ECGwaveform TST that match, while FIG. 2B show test and template waveformsthat are morphologically different because of a failure to achievecapture by one of the pacing pulses.

In an exemplary implementation, the degree of similarity between a testwaveform and a template waveform is ascertained by performing atime-domain cross-correlation between the waveforms. Loss of capture atone of the ventricular pacing sites is then indicated by a loss ofcorrelation between the test and template waveforms. The exactcorrelation values that should optimally be used in deciding whether ornot a test waveform and template waveform match may be selected on thebasis of empiric testing as the optimum values may vary for anindividual patient and/or pacemaker. Capture verification performed inthis manner may be used to determine the capture threshold of a pacingchannel by varying the pacing pulse energy and finding the minimumenergy that results in capture.

Capture verification and threshold determination as described above maybe implemented in a number of different ways. In one exemplaryembodiment, a surface ECG is recorded with conventional leads duringpacing by an external programmer that communicates with the implantedpacemaker via a radio telemetry link. The processor of the externalprogrammer then performs the correlation between the test ECG and atemplate ECG to determine if capture is achieved by the pacing pulses.In a modification to this embodiment, rather than using surface ECGs, atest electrogram recorded by an evoked response sensing channel of thepacemaker and transmitted to the external programmer is compared with atemplate electrogram to verify capture. The external programmer canemploy the telemetry link to adjust the pacing pulse energy in order todetermine the capture threshold and then set the pacing pulse energy atan appropriate value, either under the direction of a clinician orautomatically by software running in the external programmer.

In another embodiment, the controller of the pacemaker is programmed toverify capture by comparing the test electrogram with the templateelectrogram and to determine the capture threshold by varying the pacingpulse energy, either autonomously at selected times or in accordancewith instructions received over the telemetry link. The controller maythen be further programmed to automatically set the pacing pulse energyin accordance with the determined capture threshold. Determination ofthe capture threshold may be performed automatically on a periodic basisor at the direction of a clinician communicating with an externalprogrammer. The controller may also be programmed to verify capture bypacing pulses on a beat-to-beat basis. If a loss of capture is detected,the controller can then perform a capture threshold determination andadjust the pacing pulse energy as appropriate. Loss of capture eventsmay also be logged in the memory of the controller for latertransmission to an external programmer.

FIG. 3A illustrates an exemplary procedure for determining the thresholdvoltage of the right and left ventricular pacing channels (referred toas RV and LV, respectively) in a bi-ventricular pacemaker using ECG orelectrogram waveforms. The auto-threshold algorithm begins at steps A1and A2 by pacing both chambers of the heart and recording an ECG orelectrogram to create a biventricular (Bi-V) template waveform that isto be used as a reference. The pacing pulse amplitude for bothventricles is set at a relatively high value to ensure capture duringacquisition of the biventricular template waveform. After the templatewaveform is obtained, the system decreases one of the pacing amplitudesat step A3, in this case the RV pacing amplitude, before the next pace.The RV pace triggers the recording of an incoming ECG or electrogramfollowing the pace that is to be used as the test waveform in verifyingcapture. A cross correlation is performed between the template waveformand the test waveform at step A4. If the waveforms correlate well, thenboth ventricular pacing channels are assumed to have achieved captureand step A3 is repeated to decrease the RV pacing amplitude. If loss ofcorrelation is detected at step A4, then the RV pacing amplitude isassumed to have dropped below the threshold voltage. The capturethreshold is then determined at step A5 to be the RV pacing amplitudebefore the decrease at step A3. The system then sets the RV pacing pulseamplitude to the threshold voltage plus some safety factor at step A6.Steps A3 through A6 are then repeated for the LV pacing channel asindicated by step A7 in order find the LV capture threshold and set theLV pacing amplitude.

In single-site pacing systems utilizing capture verification, it isdesirable to quickly pace the heart once a loss of capture occurs. Thisbecomes especially important with pacing-dependent patients in order tomaintain cardiac activity. Often the delay associated with the externalprogrammer ECG and with the telemetry systems used for communicationbetween the external programmer and the pacemaker can prohibit immediatesafety pacing. Note, however, that the bi-ventricular auto-thresholdalgorithm presented above inherently includes a safety back-up pace withthe additional ventricular pacing channel. Once one channel losescapture, the other still causes contraction of the ventricles,maintaining ventricular function. Because of the safety provided by twoventricular pacing sites, the auto-threshold algorithm could also startwith one output high and increase the other from a sub-thresholdvoltage. (This is undesirable for more than a few cycles, of course,since the benefits of resynchronization therapy are lost ifbiventricular capture does not occur.) For example, a template can becreated for RV-only pacing. The LV pacing amplitude then increases froma sub-threshold voltage until the system detects Bi-V pacing. Thisflexibility thus facilitates the use of more efficient search algorithmsto speed convergence to the proper threshold value.

Another exemplary procedure is illustrated by FIG. 3B that decreases thetotal time of the auto-threshold algorithm by determining the LV and RVcapture thresholds simultaneously. The algorithm first acquirestemplates in the RV-only, LV-only, and Bi-V pacing configurations atsteps B1, B2, and B3. After creation of the templates, the system beginsdecreasing RV and LV pacing amplitudes simultaneously with each pace asindicated by steps B4 and B5, respectively. Similar to the previousalgorithm, the RV pace triggers the creation of a test waveform. Crosscorrelations are then performed between the test waveform and the threetemplates. If a high correlation exists between the test waveform andthe Bi-V template at step B6, both pace amplitudes are assumed to stillbe above the capture threshold value and the algorithm returns to stepsB4 and B5. Otherwise cross-correlations between the test waveform andthe RV-only and LV-only templates are performed at step B7. If a highcorrelation exists between the LV-only template and the test waveform,then the RV pacing amplitude has dropped below the threshold voltage,and the RV capture threshold is found at step B10. Likewise, a highcorrelation between the test waveform and the RV-only template indicatesthat the LV pace amplitude has dropped below the threshold voltage, andthe LV capture threshold is found at step B8. If a capture threshold isfound for a pacing channel at either step B8 or B10, steps B9 and B11then test whether a capture threshold for the other pacing channel hasbeen found so that the procedure can either end at step B13 or return tostep B4 or B5. If the system indicates no correlation between the testwaveform and any of the templates, then both pacing channels havedropped below the threshold value. The capture thresholds for bothpacing channels are then found so that the pacing thresholds can beadjusted accordingly as indicated by steps B12 and B13.

The auto-threshold algorithms illustrated in FIGS. 3A and 3B may beperformed by either the pacemaker controller or the processor of anexternal programmer when it is desired to determine the capturethresholds for the RV and LV pacing channels and set the pacingamplitudes accordingly. As noted above, however, capture verification bycross-correlating template and test waveforms may also be performed on abeat-to-beat basis by the pacemaker controller to provide an ambulatoryauto-capture function. FIGS. 4A and 4B illustrate exemplary algorithmsfor implementing auto-capture in which a capture verification test isperformed with each pace.

Referring first to FIG. 4A, the controller performs an auto-thresholdalgorithm at step C1 in which templates are acquired in the RV-only,LV-only, and Bi-V pacing configurations and capture thresholds aredetermined for the LV and RV pacing channels so that the pacing pulseamplitudes can be set accordingly. The device then operates normallywhile the algorithm waits for a paced beat at step C2. At step C3, anincoming signal is used as a test waveform and cross-correlated with theBi-V template to ascertain if both the RV and LV pacing pulses haveachieved capture. If the Bi-V template and test waveforms are highlycorrelated, capture is assumed, and the algorithm loops back to step C2.If a lack of correlation between the test waveform and the Bi-V templateis found, the algorithm separately cross-correlates the test waveformwith the LV and RV templates at step C4. If the test waveform matchesthe RV template, lack of capture in the LV pacing channel is assumed.The LV pacing pulse amplitude is then increased at step C5, and thealgorithm returns to step C1 so that updated templates can be acquiredand an updated capture threshold determined. Similarly, if the testwaveform matches the LV template, the RV pacing pulse amplitude isincreased at step C6, and the algorithm returns to step C1. If neitherthe RV nor the LV paces have achieved capture as indicated by a lack ofcorrelation between the test waveform and the two templates, both the RVand LV pacing amplitudes are increased at step C7. An auto-thresholdalgorithm is then performed at step C8, with the templates and capturethresholds updated and the pacing pulse amplitudes set accordingly. Acapture verification test is performed at step C9 as the device operateswith the updated pacing pulse amplitudes. If capture is achieved, thealgorithm returns to the capture verification loop of steps C2 and C3.If subsequent paces still fail to achieve capture, it can be assumedthat the lack of capture is due to factors other than pacing pulseenergy such as the occurrence of fusion events (i.e., a capture by apacing pulse coincident with an intrinsic contraction), difficulties inobtaining reference templates, or the occurrence of a malfunction in thepacemaker or lead system. An indication that further intervention isrequired is then logged in memory at step C10 which can be communicatedto a clinician during the next communications session with an externalprogrammer.

The ambulatory auto-capture algorithm presented in FIG. 4A relies on theinherent safety of having multiple ventricular pacing sites in theventricle. In the event that one chamber loses capture, there is a lowprobability that the other chamber will simultaneously lose capture.Nonetheless, there is a possibility that the pacemaker could losecapture on both chambers simultaneously. When capture of the ventriclesdoes not occur, it is desirable to provide a back-up safety pace to theright ventricle to immediately provide pacing therapy to prevent thepatient from feeling light headed or loosing consciousness. Dependingupon the particular implementation, the template cross-correlationalgorithms presented here could take greater than 100 ms to accuratelyidentify pacing activity. This is usually too long of a delay to delivera safety pace. Further, if a fusion event occurs, the device mustprevent pacing into a t-wave, so it must again react quickly if a safetypace is to be delivered. FIG. 4B is a flowchart diagram showing anambulatory auto-capture algorithm that uses a traditional evokedresponse comparator in addition to template recognition. Steps C1through C10 in FIG. 4B are identical to those described above withreference to FIG. 4A. After each paced beat, however, the algorithm alsotests for capture at step C11 with an evoked response comparator thatlooks for any evoked response above a specified threshold following apace. If any evoked response occurs from the ventricles, then somecardiac ventricular activity is assumed to have occurred, and thealgorithm proceeds to step C3 to perform the template correlations anddetermine which chamber or chambers were captured. If no evoked responseoccurs following a pace, on the other hand, then the algorithm applies asafety pace to the right ventricle at step C12 and then proceeds as ifneither pacing pulse captured by going to step C7. In this manner, thepatient receives pacing therapy without a noticeable delay.

In the capture verification methods described above, a testdepolarization waveform, such as an electrogram or ECG signal, isrecorded and compared with one or more template waveforms. In certainimplementations, this may involve the processor of the pacemaker orexternal programmer storing samples of a segment of the test waveform inmemory and then performing the cross-correlation operation withcorresponding samples of a template waveform. Recording and correlationof the test waveform with a template, however, may also be implementedby passing samples of the incoming electrogram or ECG signal through afinite impulse filter that performs the cross-correlation operation. Inthat case, the filter may be a matched filter having an impulse responseequal to a time-reversed version of a template waveform. The testwaveform is thus cross-correlated with a template waveform representedby the filter coefficients of the matched filter. Such a matched filtermay be provided for each of the RV-only, LV-only, and BiV templatewaveforms and may be implemented either in code executed by thecontroller or as one or more dedicated hardware components.

Capture verification by comparing a test or evoked responsedepolarization waveform with a template has been described above in thecontext of multi-site pacing where either one or both of the pairedatria or one or both of the paired ventricles are paced with multiplepaces during a cardiac cycle. It should also be appreciated that a testdepolarization waveform, such as an electrogram from an evoked responsesensing channel, can be recorded during delivery of a single pacingpulse and then compared with a template waveform representingsingle-site capture of the heart by a pacing pulse in order to determineif capture has been achieved by the delivered pacing pulse.

c. Template Acquisition

Reliable determination of whether a pacing pulse has achieved capture bycomparison of a test depolarization waveform with a reference templateas described above requires that the reference template accuratelyreflect the particular evoked response being looked for. Simplyrecording a depolarization waveform during a pacing cycle with pulseenergies known to be sufficient to achieve capture, however, does notguarantee a satisfactory reference template because of the possibilityof PVC's, fusion events, or external noise. A PVC or prematureventricular contraction occurs when an intrinsic ventricular contractionoccurs independently from excitation originating from the SA node. Afusion event is the occurrence of an intrinsic contraction coincidentwith capture of the heart by a pacing pulse. External noise may beproduced by any source of electromagnetic energy such as a telemetrytransmission from an external programmer. If any of these events occurwhile a reference template is being recorded, the resulting templatewill be a corrupted waveform that will not correlate with the desiredcapture event and will lead to erroneous results during an autothresholdroutine. In order to avoid these problems and construct accuratetemplates, a template acquisition algorithm may be employed that takesadvantage of the anomalous nature of the corrupting events.

FIG. 5 shows a flowchart of an exemplary template acquisition routine.In order to avoid recording fusion as well as other anomalous events asreference templates, the routine calculates the correlation coefficient(CC) of successive evoked responses and decides which responses to keepas templates based upon the CC. Initially, two evoked responses arecollected and normalized at steps D0 and D1. The correlation between thetwo normalized evoked responses is calculated. If the two waveforms arefound to highly correlate at step D3, then they are averaged togetherand the average is again normalized at step D4. The algorithm thenreturns to step D1 to acquire another evoked response. This processcontinues until five evoked responses are averaged together as testedfor at step D2. If, on the other hand, the two complexes do not highlycorrelate at step D3, then the algorithm waits for several beats andthen collects a third evoked response at step D5. Clinical data hasindicated that PVCs or telemetry programming can affect the morphologyof an evoked response for several beats. Waiting several beats thusallows any possible perturbation of the evoked response to completebefore continuing. If the first and third evoked responses highlycorrelate at step D6, the second evoked response is regarded as noise orfusion. The second evoked response is then thrown out at step D7, andthe first and third evoked responses are averaged at step D4. If thefirst and the third evoke responses do not highly correlate at step D6,then the initial complex is assumed to have been fusion. Because of theturbulence that can last several beats following a PVC or fusion, thefirst fusion event could have affected the second evoked response.Therefore, the algorithm keeps only the third evoked response at step D8and begins again at step D1.

d. Discriminating between Biventricular and Right-Ventricular Capture

FIG. 6 shows an example of BiV, RV, and LV paced evoked responses, each400 ms in length, taken from one subject with the shock channel used asthe evoked response sensing channel. As can be seen, the LV and BiVpacing cases produce great differences in the evoked responses.Considering that the shock electrodes are located in the right side ofthe heart, the sensing vector will be sensitive to a lack of activityfrom the right ventricle. This, of course, would also be true for anyevoked response sensing channel with sensing electrodes on the rightside of the heart. Conversely, the BiV and RV evoked responses display ahigh degree of similarity, correlating more than 95% in this particularsubject. This is to be expected since both the RV and BiV paces willsimilarly contract the right ventricle tissue early in the r-wavecomplex. Much of the right ventricular cells are placed in refractoryfrom the RV or BiV pace, allowing little further activity once thewavefront arrives from the left ventricular pace. Additionally, themagnitude of the signals from the right ventricle can swamp anyfar-field signals from the left side.

The high similarity of the BiV and RV templates in this example suggestthat standard cross correlation techniques may not be sufficient fordistinguishing between BiV and RV capture when the shock channel, or anysensing channel with electrodes located on the right side of the heart,is used as the evoked response sensing channel. A secondary criterionmay therefore be used to fully discriminate between BiV and RV evokedresponses with a right-sided sensing vector. It has been found that thehighest level of difference between two such evoked responses occursapproximately 200 ms following a pace during the s-t transition. Thenormalized evoked responses to BiV and RV capture with a right-sidedsensing vector in a number of experimental subjects have been found tobe consistent and different during this time interval. This morphologydifference can be used to distinguish between the BiV and RV capture bycalculating the total energy in the normalized evoked response during asub-window interval of 200-300 ms following the pace. The acquired BiVand RV templates are first used to calculate the energy in bothtemplates. An energy bound can then be established by taking half of theenergy difference:$E_{limit} = {\frac{E_{\max} - E_{\min}}{2} + E_{\min}}$where E_(max) is the larger of template energies, E_(min) is the lesservalue, and E_(limit) is the energy bound or limit value. For example,the RV template may have a greater energy in the sub-window than the BiVtemplate. A normalized evoked response with energy above the limit wouldthen be classified as an RV capture, while a normalized evoked responsewith less total energy than the limit would be denoted as a BiV capture.Conversely, if the RV template has a lesser energy in the sub-windowthan the BiV template, an evoked response with greater total energy thanthe limit would be classified as a BiV capture. It should be appreciatedthat the same method could be used for discriminating between BiV and LVcapture in the case where the evoked response sensing channel hassensing leads located on the left side of the heart.

In the method for BiV/RV capture discrimination just described, wherethe BiV and RV evoked response waveforms are similar due to right-sidedsensing, BiV and RV capture are distinguished by measuring the totalsignal energy in a particular sub-window interval following the pace.Whether or not this BiV/RV capture discrimination method is neededdepends upon both the particular patient and the electrode arrangementused for sensing the evoked response. Discussed below is atemplate-based capture verification algorithm that, among other things,employs the BiV/RV capture discrimination method and uses additionalcorrelation criteria to determine when the method should be used.

e. Algorithm for Enhanced Discrimination of Evoked Responses

In the capture verification algorithms discussed above with respectFIGS. 3A-B and 4A-B, capture of one or both ventricles was assumed whenthe evoked response waveform was sufficiently correlated with aparticular template waveform. Ideally, however, a template-based captureverification algorithm would reliably distinguish between one of fiveevents: BiV capture, RV capture, LV capture, fusion, or asystole. Also,as discussed above, simple correlation of an evoked response withtemplate waveforms representing left-ventricular, right-ventricular, orbi-ventricular capture may not be able to reliably distinguish betweenbiventricular capture and capture of the ventricle where the evokedresponse sensing electrodes are located.

A template-based capture verification algorithm which employs additionaldetection criteria to distinguish between all of the possible evokedresponse events is illustrated in FIG. 7. In order to add specificity tothe algorithm, the evoked response waveform is correlated with templatewaveforms representing BiV, RV, and LV capture and is then classifiedaccording to whether it meets multiple criteria for BiV, RV, or LVcapture. The multiple criteria for detecting each form of capturerequire not only a high degree of correlation with the template waveformrepresenting that form of capture but also correlation values with theother template waveforms within specified ranges selected in accordancewith the correlation between the different template waveforms. Forexample, an evoked response waveform will only be classified as meetingthe criteria for BiV capture when it is highly correlated with the BiVtemplate and correlated with the RV and LV templates to roughly the sameextent as the BiV template. When an evoked response waveform meets thecriteria for both BiV and RV capture, the method for BiV/RVdiscrimination using the signal energy in the subwindow intervaldiscussed above is employed. If none of the capture criteria are met bythe evoked response waveform, the algorithm then detects either asystole(i.e., no capture) or a fusion beat in accordance with the total signalenergy in the evoked response waveform.

Referring to FIG. 7, the algorithm begins at step E0 with acquisition oftemplates. In order to ensure sufficient signal for a valid comparison,both the evoked response and template waveforms are recorded for 400milliseconds following a pace. At an example sample rate of 200 Hz, anarray of 80 samples constitutes each 400 ms recorded template or evokedresponse waveform. The algorithm generates the templates for BiV, RV,and LV capture events by pacing the heart in the appropriate pacingmodes and recording the resulting waveforms. During templateacquisition, the device is programmed with high pacing output voltagesto ensure capture from the pacing outputs. The algorithm may also usethe template acquisition routine described above with reference to FIG.5 in order to ensure that the templates faithfully reflect the differentcapture events.

Following the generation of the templates at step E0, the correlationcoefficients between the templates are calculated at step E1 to measurethe degree of similarity between all three templates. The correlationcoefficients are calculated as follows:${CC} = \frac{\sum\limits_{i = 1}^{n}{x_{i} \cdot y_{i}}}{{\left\lbrack {\sum\limits_{i = 1}^{n}x_{i}^{2}} \right\rbrack^{1/2}\left\lbrack {\sum\limits_{i = 1}^{n}y_{i}^{2}} \right\rbrack}^{1/2}}$where x is the first template, y is the second template, and n is thenumber of samples in the template. Note that the denominator terms arenormalization factors for each template. Thus, three templatecorrelation coefficients are produced: CC_(BiV&RV), CC_(BiV&LV), andCC_(LV&RV). These correlation coefficients between the templates areused to establish bounds to help classify evoked response waveforms.FIG. 8 shows a plot of the template correlation coefficients of thewaveforms shown in FIG. 6. As might be expected, the similarity of theBiV and RV waveforms produces a high correlation between the twotemplates. Alternatively, the lack of similarity between the LV and boththe RV and BiV waveform yields a low correlation. Bounds are establishedat an exemplary ±20 percentage points on either side of the calculatedcorrelation coefficients. These bounds for the templatecross-correlations can be used to more specifically detect particularcapture events by determining if an evoked response not only highlycorrelates with one template but also correlates with the other twotemplates to an expected extent.

Once the templates and bounds have been properly established, thealgorithm is ready to determine capture of subsequent paced beats atstep E2. Following a pace, a 400 ms portion of the evoked responsesignal is collected and normalized:${ER}_{norm} = \frac{ER}{\left\lbrack {\sum\limits_{i = 1}^{n}\left( {ER}_{i} \right)^{2}} \right\rbrack^{1/2}}$where ER is the evoked response waveform, and n is the number of samplesin the waveform. Next, the ER waveform is cross-correlated with thetemplates by calculating a correlation coefficient between thenormalized evoked response waveform and each normalized template:${CC}_{{{ER}\&}{BiV}} = {\sum\limits_{i = 1}^{n}{{ER}_{{norm},i} \cdot {BiV}_{{norm},i}}}$${CC}_{{{ER}\&}{RV}} = {\sum\limits_{i = 1}^{n}{{ER}_{{norm},i} \cdot {RV}_{{norm},i}}}$${CC}_{{{ER}\&}{LV}} = {\sum\limits_{i = 1}^{n}{{ER}_{{norm},i} \cdot {LV}_{{norm},i}}}$

Next, at steps E3 through E5, the evoked response is classifiedaccording to multiple criteria for each of the three possible captureevents: BiV, RV, or LV capture. The evoked response may meet thecriteria for one or more such events or may not meet any of thecriteria. In order to meet the criteria for a particular capture event,the correlation coefficient of the evoked response waveform with thetemplate for that capture event must be above a specified threshold (0.9in this implementation), and the correlation coefficients of the evokedresponse waveform with the other must be within the bounds identified atstep E1. As an example, assume the ER highly correlates with the BiVtemplate, meeting the first criteria of step E3. If the crosscorrelations of the ER and the other two templates are within the boundspredicted by the earlier template analysis in step E2, the ER isclassified as biventricular capture. In other words, if the ER closelymatches the morphology of the BiV template and does not match the othertemplates in the expected manner, then the waveform is classified asbiventricular capture.

After the ER waveform is classified according to the criteria of stepsE3 through E5, subsequent steps determine the final detection result. Ifthe ER waveform meets the criteria for both BiV and RV capture, asdetermined at step E6, then the total energy of the ER waveform in asub-window 200-300 ms following the pace is utilized as a secondarydiscrimination criterion at step E7. If the total energy in thesub-window is above or below a specified limit, then RV capture isdetected at step E11. Otherwise, BiV capture is detected at step E9. Ifthe ER waveform is classified as meeting the criteria for only onecapture event, the algorithm detects either BiV, RV, or LV capture atsteps E8 through E13. If the ER waveform is classified as not meetingany other capture event criteria, the algorithm will detect eitherasystole or a fusion beat. If the total energy in the ER waveform isless than a specified threshold percentage (e.g., 10%) of the energy inthe BiV template prior to normalization, as determined at step E14, thenasystole is declared at step E15. Otherwise, since the ER waveform hasbeen found to not meet any of the capture event criteria but is stillrepresentative of cardiac activity, the pace is classified as a fusionbeat at step E16.

Although the invention has been described in conjunction with theforegoing specific embodiment, many alternatives, variations, andmodifications will be apparent to those of ordinary skill in the art.Such alternatives, variations, and modifications are intended to fallwithin the scope of the following appended claims.

1. A cardiac pacemaker, comprising: first and second pacing channels fordelivering pacing pulses to electrodes disposed for pacing each of thepaired atria or each of the paired ventricles; a controller forcontrolling the delivery of pacing pulses in accordance with aprogrammed pacing mode; an evoked response sensing channel for sensingan evoked response generated after a pacing pulse; and, wherein thecontroller is programmed to: deliver first and second pacing pulses fromthe first and second pacing channels, respectively, during a cardiaccycle; record a test electrogram from the evoked response sensingchannel during delivery of the first and second pacing pulses; measure aparameter related to the signal energy of the test electrogram; comparethe test electrogram with template electrograms representing capture ofthe heart by both of the first and second pacing pulses, representingcapture by a pacing pulse delivered only from the first pacing channel,and representing capture by a pacing pulse delivered only from thesecond pacing channel; and, determine which of the delivered first andsecond pacing pulses have achieved capture based upon the templatecomparisons and the value of the parameter related to the signal energyof the test electrogram.
 2. The pacemaker of claim 1 wherein thecontroller is programmed to compare the test and template electrogramsby performing a time-domain cross-correlation.
 3. The pacemaker of claim1 wherein the first and second pacing channels are configurable as rightand left ventricular pacing channels, the evoked response sensingchannel is configurable with an electrode disposed near the rightventricle, and wherein the controller is programmed to classify the testelectrogram as representing right ventricular (RV) capture, leftventricular (LV) capture, or biventricular (BiV) capture based upon acomparison of the test electrogram with RV, LV, and BiV templatesrepresenting RV, LV, and BiV capture, respectively, and to furtherdistinguish between RV capture and BiV capture based upon the value ofthe parameter related to the signal energy of the test electrogram andthe value of similar parameters for the BiV and RV templates.
 4. Thepacemaker of claim 1 wherein the first and second pacing channels areconfigurable as right and left ventricular pacing channels, the evokedresponse sensing channel is configurable with an electrode disposed nearthe left ventricle, and wherein the controller is programmed to classifythe test electrogram as representing right ventricular (RV) capture,left ventricular (LV) capture, or biventricular (BiV) capture based upona comparison of the test electrogram with RV, LV, and BiV templatesrepresenting RV, LV, and BiV capture, respectively, and to furtherdistinguish between LV capture and BiV capture based upon the value ofthe parameter related to the signal energy of the test electrogram andthe value of similar parameters for the BiV and LV templates.
 5. Thepacemaker of claim 1 wherein the parameter related to the signal energyof a test electrogram is the signal energy during a sub-window intervalof 200-300 ms following the pace.
 6. The pacemaker of claim 1 whereinthe controller is further programmed to vary the pulse energy of thepacing pulses in order to determine a capture threshold for a pacingchannel.
 7. The pacemaker of claim 6 wherein the controller is furtherprogrammed to lower the pacing pulse energy of a pacing channel untilcapture is no longer achieved by that channel in order to determine thecapture threshold.
 8. The pacemaker of claim 7 wherein the controller isprogrammed to determine a capture threshold for each of the first andsecond pacing channels by lowering the pacing energy of each pacingchannel separately until the test electrogram no longer matches thetemplate electrogram representing capture by both of the first andsecond pacing pulses.
 9. The pacemaker of claim 7 wherein the controlleris programmed to determine a capture threshold of the first and secondpacing channels by: lowering the pacing energy of the first pacingchannel until the test electrogram matches the template electrogramrepresenting capture by the second pacing pulse but does not match thetemplate electrogram representing capture by the first pacing pulse;and, lowering the pacing energy of the second pacing channel until thetest electrogram matches a template electrogram representing capture bythe first pacing pulse but does not match the template electrogramrepresenting capture by the second pacing pulse.
 10. The pacemaker ofclaim 6 wherein the controller is further programmed to adjust thepacing pulse energy of a pacing channel in accordance with the resultsof the capture threshold determination.
 11. A method for operating acardiac pacemaker, comprising: delivering first and second pacing pulsesduring a cardiac cycle to electrodes disposed for pacing each of thepaired atria or each of the paired ventricles in accordance with aprogrammed pacing mode; sensing an evoked response generated after apacing pulse; recording a test electrogram from the evoked responsesensing channel during delivery of the first and second pacing pulses;measuring a parameter related to the signal energy of the testelectrogram; comparing the test electrogram with template electrogramsrepresenting capture of the heart by both of the first and second pacingpulses, representing capture by a pacing pulse delivered only from thefirst pacing channel, and representing capture by a pacing pulsedelivered only from the second pacing channel; and, determining which ofthe delivered first and second pacing pulses have achieved capture basedupon the template comparisons and the value of the parameter related tothe signal energy of the test electrogram.
 12. The method of claim 11wherein the comparison of the test and template electrograms implementedby performing a time-domain cross-correlation.
 13. The method of claim11 wherein the first and second pacing channels are configured as rightand left ventricular pacing channels, the evoked response sensingchannel is configured with an electrode disposed near the rightventricle, and further comprising classifying the test electrogram asrepresenting right ventricular (RV) capture, left ventricular (LV)capture, or biventricular (BiV) capture based upon a comparison of thetest electrogram with RV, LV, and BiV templates representing RV, LV, andBiV capture, respectively, and farther distinguishing between RV captureand BiV capture based upon the value of the parameter related to thesignal energy of the test electrogram and the value of similarparameters for the BiV and RV templates.
 14. The method of claim 11wherein the first and second pacing channels are configured as right andleft ventricular pacing channels, the evoked response sensing channel isconfigured with an electrode disposed near the left ventricle, andfurther comprising classifying the test electrogram as representingright ventricular (RV) capture, left ventricular (LV) capture, orbiventricular (BiV) capture based upon a comparison of the testelectrogram with RV, LV, and BiV templates representing RV, LV, and BiVcapture, respectively, and further distinguishing between LV capture andBiV capture based upon the value of the parameter related to the signalenergy of the test electrogram and the value of similar parameters forthe BiV and LV templates.
 15. The method of claim 11 wherein theparameter related to the signal energy of a test electrogram is thesignal energy during a sub-window interval of 200-300 ms following thepace.
 16. The method of claim 11 further comprising varying the pulseenergy of the pacing pulses in order to determine a capture thresholdfor a pacing channel.
 17. The method of claim 16 wherein the controlleris further programmed to lower the pacing pulse energy of a pacingchannel until capture is no longer achieved by that channel in order todetermine the capture threshold.
 18. The method of claim 17 furthercomprising determining a capture threshold for each of the first andsecond pacing channels by lowering the pacing energy of each pacingchannel separately until the test electrogram no longer matches thetemplate electrogram representing capture by both of the first andsecond pacing pulses.
 19. The method of claim 17 further comprisingdetermining a capture threshold of the first and second pacing channelsby: lowering the pacing energy of the first pacing channel until thetest electrogram matches the template electrogram representing captureby the second pacing pulse but does not match the template electrogramrepresenting capture by the first pacing pulse; and, lowering the pacingenergy of the second pacing channel until the test electrogram matches atemplate electrogram representing capture by the first pacing pulse butdoes not match the template electrogram representing capture by thesecond pacing pulse.
 20. The method of claim 16 further comprisingadjusting the pacing pulse energy of a pacing channel in accordance withthe results of the capture threshold determination.